import 'package:json_annotation/json_annotation.dart';

part "user_info.g.dart";

@JsonSerializable()
class UserInfo {
  String? avatar;
  String? gender;
  String? nickname;
  String? phone;
  int? id;

  UserInfo({
    this.avatar,
    this.gender,
    this.nickname,
    this.phone,
    this.id,
  });

  factory UserInfo.fromJson(Map<String, dynamic> json) => _$UserInfoFromJson(json);

  Map<String, dynamic> toJson() => _$UserInfoToJson(this);

  /// 命名构造函数
  UserInfo.empty();
}
